include ../rules.mk

CFLAGS  := $(CFLAGS) -std=c99

SOURCES := md.c
OBJECTS := $(call to_object,$(SOURCES))
DEPENDS := $(OBJECTS:.o=.d)

all: enter  programs leave
	@echo "====> Finished"

enter:
	@echo "==> building in $(HERE)"

leave:
	@echo "==> all done in $(HERE)"

programs: md cell1D

cell1D : $(call to_object,mds_test_cell1D.c)
	$(LINK)

md: $(OBJECTS)
	$(LINK)

clean:
	$(CLEAN) md md.exe atoms.xyz nrj.txt temppress.txt
	@rm -f *.aux *.log *.toc
	@rm -f cell1D cell1D.exe

rebuild:
	@$(MAKE) -s clean && $(MAKE) -s all
	
-include $(DEPENDS)

